<template>
	<view>
		<view class="title-tips">
			<view class="w94">
				地址信息仅用于上门服务，隐私信息将完全保密
			</view>

			<view class="w94 flex-between" style="padding:20rpx 0rpx;" v-for="(item,index) in values">
				<view style="width:20%;color:#505050;text-align: left;">
					{{item.name}}
				</view>
				<view style="width:70%">
					<u-input :type="item.type=='map'?'text':item.type" v-model="item.value"></u-input>
				</view>
				<view style="width:10%;color:#999;display: flex;align-items: center;justify-content:center;">
					<u-icon v-if="item.type=='map'" name="map-fill" size="34"></u-icon>
				</view>
			</view>

			<view class="w94 flex-between" style="padding:20rpx 0rpx;">
				<view style="width:20%;color:#505050;text-align: left;">
					设为默认
				</view>
				<view style="width:60%">
				
				</view>
				<view style="width:20%;color:#999;display: flex;align-items: center;justify-content:center;">
					<u-switch v-model="isDef"></u-switch>
				</view>
			</view>

		</view>
		
			<view class="bottom-view" @click="onSubmit">保存</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isDef:false,
				values: [{
						name: '联系人',
						key: '',
						value: '',
						type: 'text'
					},
					{
						name: '手机号',
						key: '',
						value: '',
						type: 'number'
					},
					{
						name: '所在地',
						key: '',
						value: '',
						type: 'map'
					},
					{
						name: '门牌号',
						key: '',
						value: '',
						type: 'text'
					}
				]
			}
		},
		methods: {

		}
	}
</script>

<style>
	page {
		background: #fff;
	}

	.title-tips {
		width: 100%;
		height: 70rpx;
		line-height: 70rpx;
		background: #fcf0e2;
		color: #a0783d;
		font-size: 28rpx;
	}
	
	.bottom-view {
		width: 90%;
		/* margin:0 auto; */
		left: 5%;
		background: #2e80fe;
		color: #fff;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		font-size: 30rpx;
		border-radius: 50rpx;
		position: fixed;
		bottom: 20rpx;
	}
</style>
